home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
ASTRNOMY
/
GRVKIT02.ZIP
/
GRAVKIT.ING
< prev
next >
Wrap
Text File
|
1994-01-07
|
8KB
|
220 lines
GravKit v0.2 11-Dic-93
Manual
* * *
GravKit is a whole of program for the gravitational simulation of a n-body
system. There are three programs:
Cluster It perform the calculus from a file with the initial conditions
that describe the n-body system. It allow the graphic view
and the save of the path in file with many formats.
Movie It allow to read the files saved from cluster and to play them
with various features.
Genr Procedure in progress. Now build a whole of n-body with random
initial condition in variable limits.
********************************************************************************
Introduction.
-------------
The kernel of cluster grabbed out an article by Alfredo Di Stefano on
4/93 and 5/93 numbers of the "Commodore Gazette" (IHT Italy). I used
the function called 'Simulate' and 'ClusterLeggi' (ReadCluster). The first
perform the calculus with the gravitational law and no optimization:
for each step and for every body it consider all other n-1 body. This
means a 'little' slowness when the body are > 100 (also with a 486DX).
Purpose.
--------
I have wrote this procedure for three mean ends:
1) to simulate the tides in the galactic interaction or collision
2) to compare this results with the results from an other artful procedure
yet in progress
3) to join the two efforts in a unique program (NGC New Galaxy Collider)
provided with many function a friendly menu interface and the possibility
for users to append their calculus functions.
Animations format.
------------------
Actually the animations can saved in four different formats, with the options
below in cluster program:
Option Description Extension
-n only generic and numeric issue .DAT
-h pixel incremental issue (HGC e 3270) 720x348 .HGC
-c pixel incremental issue (CGA) 320x200 .CGA
-v pixel incremental issue (VGA e ATT) 640x480 .VGA
With -n you can save the position of the object in double float format
therefore 8 byte for one coordinate. This allow to play the animation with
anyone graphic card, but above all, allow to compare the results with others
procedures.
With the others options the increment in pixel between two steps is saved.
These formats depend from the graphic card used.
How to obtain a fluid animation.
--------------------------------
The animation file must loaded in the hard drive cache memory (e.g. play
once the animation). Then you must load in the "config.sys" a cache program
like the SmartDrive. If you have MS-Windows probably you already have it.
To see how much memory is for cache you can digit:
smartdrv /S <return>
Discontinuity or breaks in the animation can depend on various problems
and have various solutions:
Problem Solution
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Cache memory < file length - Increase size of cache memory
- Use a disk compressor like
Stacker and use SmartDrive only
on compressed partition (the
compressed file is in cache)
- You haven't EMS or XMS to use - Use a defrag program like
like cache memory Compress (PcTools) or SpeedDisk (Norton)
Cluster.
--------
USE: cluster <option> <res> filename <steps>
[option] = -g only graphic issue (default)
= -G only graphic issue without tracks
= -t only graphic issue with limited tracks
= -n only generic and numeric issue
= -h pixel incremental issue (HGC e 3270) 720x348
= -c pixel incremental issue (CGA) 320x200
= -v pixel incremental issue (VGA e ATT) 640x480
= -gn both graphic and numeric issue
[res] = /0 autodetect of graphic card (default)
= /1 CGA 320x200 4 color
= /2 HGC 720x384 2 color Hercules
= /3 ATT 640x400 2 color Olivetti
= /4 VGA 640x480 16 color
[steps] = # of step (only with -n|-h|-c|-v)
The file name must have the extension:
cluster sunearth.clu
equal to:
cluster -g /0 sunearth.clu
The .CLU files format is:
START_DATA: SunEarth.clu
DELTA 0.00027
PROXIMITY 0.001
MAGNIFICATION 0.001
#BODY 2
COORDINATES_XYZ VELOCITY_XYZ MASS COLOR
0 0 0 0.00 0.00 0.00 2.00 4
1 0 0 0.00 8.88 0.00 1e-6 1
END_DATA
Where the coordinates are in A.U. and mass in solar mass. In the next version
I will include the possibility to get the gravitational constant (G) in order
to use a different unit system.
The color are like below, only for CGA and VGA graphic card:
VGA COLOR | # | CGA COLOR
---------------------------------
BLUE | 1 | LIGHTGREEN
GREEN | 2 | LIGHTRED
CYAN | 3 | YELLOW
RED | 4 | LIGHTGREEN
MAGENTA | 5 | LIGHTRED
BROWN | 6 | YELLOW
LIGHTGRAY | 7 | LIGHTGREEN
DARKGRAY | 8 | LIGHTRED
LIGHTBLUE | 9 | YELLOW
LIGHTGREEN | 10 | LIGHTGREEN
LIGHTCYAN | 11 | LIGHTRED
LIGHTRED | 12 | YELLOW
LIGHTMAGENTA | 13 | LIGHTGREEN
YELLOW | 14 | LIGHTRED
WHITE | 15 | YELLOW
Movie.
------
USE: movie [opt] [res] filename.<ext> [delay]
[opt] = -t with tracks
[res] = /0 autodetect graphic card (default)
= /1 CGA 320x200 4 color
= /2 HGC 720x348 2 color Hercules
= /3 3270 720x350 2 color PC3270
= /4 ATT 640x400 2 color Olivetti
= /5 VGA 640x480 16 color
[delay] = delay in ms (default->0)
<ext> = dat -> generic file (double) and default
= cga -> pixel incremental file (CGA)
= hgc -> pixel incremental file (HGC and 3270)
= vga -> pixel incremental file (VGA and ATT)
On Olivetti M24 try this to use ATT card instead of CGA (autodetect):
movie /4 nomefile.vga
if you want 30 step length tracks and a 0.3 secs delay:
movie -t30 /4 nomefile.vga 300
After you run program, you can position the first frame using cursors. Then
you can start/PAUSE animation using <space>. At end use "<" key to rewind.
If you press "l" at start you have an infinite loop.
ESC to quit, at any time.
********************************************************************************
This program was put in the Public Domain by the author. It may be distributed
freely. It may not be sold, nor be made part of anything that is sold.
If you like it send a email or a postcard to:
Alessandro Freda
Via Maona 3/10
16155 Genova-Pegli
ITALY
email: freda@dist.dist.unige.it
If my program will interest many people I will upload on
bbs and internet the next version.
Report on bug, requests, advice, suggestion are welcomed.
... and ... I'm sorry but usually my English is very scarce.
I hope to be comprehensible.
********************************************************************************